package com.athuahua.spzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.athuahua.spzx.entity.Region;
import com.athuahua.spzx.service.RegionService;
import com.athuahua.spzx.mapper.RegionMapper;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author huahua
* @description 针对表【region(地区信息表)】的数据库操作Service实现
* @createDate 2024-08-26 17:36:24
*/
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region>
    implements RegionService{

    @Resource
    private RegionMapper RegionMapper;

    @Override
    public List<Region> selectByParentCode(String parentCode) {


        return RegionMapper.selectList(new LambdaQueryWrapper<Region>()
                .eq(Region::getParentCode, parentCode));
    }
}




